<?php if (!defined('THINK_PATH')) exit(); /*a:5:{s:80:"D:\phpStudy\WWW\huanhuizhangwu\public/../application/admin\view\public\left.html";i:1557301393;s:84:"D:\phpStudy\WWW\huanhuizhangwu\public/../application/admin\view\auth\allocation.html";i:1561801895;s:72:"D:\phpStudy\WWW\huanhuizhangwu\application\admin\view\public\layout.html";i:1557300144;s:69:"D:\phpStudy\WWW\huanhuizhangwu\application\admin\view\public\top.html";i:1563035424;s:70:"D:\phpStudy\WWW\huanhuizhangwu\application\admin\view\public\left.html";i:1557301393;}*/ ?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>换汇账务系统--<?php echo $title; ?></title>
        <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="stylesheet" type="text/css" href="/static/home/lib/bootstrap/css/bootstrap.css">

        <link rel="stylesheet" type="text/css" href="/static/home/stylesheets/theme.css">
        <link rel="stylesheet" href="/static/home/lib/font-awesome/css/font-awesome.css">

        <script src="/static/home/lib/jquery-1.7.2.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="/static/layer/layer.js"></script>
        <script src="/static/laydate/laydate.js"></script>

        <!-- Demo page code -->

        <style type="text/css">
            #line-chart {
                height:300px;
                width:800px;
                margin: 0px auto;
                margin-top: 1em;
            }
            .brand { font-family: georgia, serif; }
            .brand .first {
                color: #ccc;
                font-style: italic;
            }
            .brand .second {
                color: #fff;
                font-weight: bold;
            }
        </style>

        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->


    </head>

    <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
    <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
    <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
    <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
    <!--[if (gt IE 9)|!(IE)]><!--> 
    <body class=""> 
        <!--<![endif]-->

        <div class="navbar">
    <div class="navbar-inner">
        <ul class="nav pull-right">

            <!--            <li><a href="#" class="hidden-phone visible-tablet visible-desktop" role="button">Settings</a></li>-->
            <li id="fat-menu" class="dropdown">
                <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                    <i class="icon-user"></i> <?php echo \think\Request::instance()->session('u_username'); ?>
                    <i class="icon-caret-down"></i>
                </a>

                <ul class="dropdown-menu">
                    <!--                    <li><a tabindex="-1" href="#">My Account</a></li>-->
                    <!--                    <li class="divider"></li>-->
                    <li><a tabindex="-1" class="visible-phone" href="#"> <?php echo \think\Request::instance()->session('u_username'); ?></a></li>
                    <li class="divider visible-phone"></li>
                    <li class="logout"><a tabindex="-1" style="cursor: pointer">退出</a></li>
                </ul>
            </li>

        </ul>
        <?php       
        $intername = db("config")->where("id=1")->value("name");       
        ?>
        <a class="brand" href="<?php echo url('/admin/Index'); ?>"><span class="second"><?php echo $intername; ?></span></a>
    </div>
</div>
<script>
    $(".logout").click(function () {

        layer.confirm('确认退出吗？', {
            btn: ['确认', '取消'] //按钮
        }, function (index) {

            layer.close(index);

            layer.load(1, {
                shade: [0.2, '#fff'], //0.1透明度的白色背景
                time: 1000
            });
            setTimeout(function () {
                window.location.href = "<?php echo url('/admin/Login/logout'); ?>";//注销登录
            }, 1000);


//            layer.msg('的确很重要', {icon: 1});
        }, function () {

//            layer.msg('也可以这样', {
//                time: 20000, //20s后自动关闭
//                btn: ['明白了', '知道了']
//            });
        });



    });
</script>


               
<div class="sidebar-nav">
    <form class="search form-inline">
      <?php
      $cue = session("cue");
      $pid = db("auth")->where("auth_name='$cue'")->value("auth_pid");  
      $a = cookie("think_var");
      ?>
    </form>


    <?php if(is_array($onelist) || $onelist instanceof \think\Collection || $onelist instanceof \think\Paginator): $i = 0; $__LIST__ = $onelist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$one): $mod = ($i % 2 );++$i;?>
    <a href="#<?php echo $one['auth_id']; ?>" class="nav-header" data-toggle="collapse"><i class="<?php echo $one['auth_icon']; ?>"></i><?php echo $one['auth_name']; ?><i class="icon-chevron-up"></i></a>
    
    <ul id="<?php echo $one['auth_id']; ?>" class="nav nav-list collapse <?php if($pid==$one['auth_id']): ?>in<?php endif; ?>">
        <?php if(is_array($twolist) || $twolist instanceof \think\Collection || $twolist instanceof \think\Paginator): $i = 0; $__LIST__ = $twolist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$two): $mod = ($i % 2 );++$i;if($two['auth_pid']==$one['auth_id']): ?>
        <li class="<?php if($two['auth_name']==$cue): ?>active<?php else: endif; ?>"><a href="/<?php echo $two['auth_a']; ?>"><?php echo $two['auth_name']; ?></a></li>
        <?php endif; endforeach; endif; else: echo "" ;endif; ?>
    </ul>
    
    <?php endforeach; endif; else: echo "" ;endif; ?>
</div>

        
<link rel="stylesheet" href="/static/assets/css/kaiguan.css">
<link rel="stylesheet" href="/static/assets/css/nor.css">
<style type="text/css"> 
    .cssguycomments {background:#eee;border:#ddd;padding:8px;margin-bottom:40px;} 
    .cssguycomments p {font:normal 12px/18px verdana;} 

    table    {border-collapse:collapse;} 
    thead th { 
        font:bold 13px/18px; 
        text-align:left; 
        background:#e6e6e6; 
        color:#333; 
        padding:8px 16px 8px 8px; 
        border-right:1px solid #fff; 
        border-bottom:1px solid #fff; 
        cursor: pointer;
    } 
    thead th.null {background:#fff;} 
    tbody th { 
        font:bold 12px/15px; 
        text-align:left; 
        background:#e6e6e6; 
        color:#333; 
        padding:8px; 
        border-bottom:1px solid #dddddd; 
        border-right:1px solid #fff; 
        cursor: pointer;
    } 
    tbody td { 
        font:normal 12px/15px; 
        color:#333; 
        padding:8px; 
        border-right:1px solid #dddddd; 
        border-bottom:1px solid #dddddd; 
        cursor: pointer;
    } 
    /*  ��3���ǹؼ�   --cssrain.cn */ 
    tbody td.on {background:#dddddd;}    
    thead th.on {background:#dddddd;} 
    tbody th.on {background:#dddddd;} 
</style> 
<script type="text/javascript">
    /* 
     For functions getElementsByClassName, addClassName, and removeClassName 
     Copyright Robert Nyman, <a href="http://www.robertnyman.com" target="_blank">http://www.robertnyman.com</a> 
     Free to use if this text is included 
     */
    function addLoadEvent(func) {
        var oldonload = window.onload;
        if (typeof window.onload != 'function') {
            window.onload = func;
        } else {
            window.onload = function () {
                oldonload();
                func();
            }
        }
    }

    function getElementsByClassName(className, tag, elm) {
        var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");
        var tag = tag || "*";
        var elm = elm || document;
        var elements = (tag == "*" && elm.all) ? elm.all : elm.getElementsByTagName(tag);
        var returnElements = [];
        var current;
        var length = elements.length;
        for (var i = 0; i < length; i++) {
            current = elements[i];
            if (testClass.test(current.className)) {
                returnElements.push(current);
            }
        }
        return returnElements;
    }

    function addClassName(elm, className) {
        var currentClass = elm.className;
        if (!new RegExp(("(^|\\s)" + className + "(\\s|$)"), "i").test(currentClass)) {
            elm.className = currentClass + ((currentClass.length > 0) ? " " : "") + className;
        }
        return elm.className;
    }

    function removeClassName(elm, className) {
        var classToRemove = new RegExp(("(^|\\s)" + className + "(\\s|$)"), "i");
        elm.className = elm.className.replace(classToRemove, "").replace(/^\s+|\s+$/g, "");
        return elm.className;
    }

    function makeTheTableHeadsHighlight() {
        // get all the td's in the heart of the table... 
        var table = document.getElementById('rockartists');
        var tbody = table.getElementsByTagName('tbody');
        var tbodytds = table.getElementsByTagName('td');

        // and loop through them... 
        for (var i = 0; i < tbodytds.length; i++) {

            // take note of their default class name 
            tbodytds[i].oldClassName = tbodytds[i].className;

            // when someone moves their mouse over one of those cells... 
            tbodytds[i].onmouseover = function () {

                // attach 'on' to the pointed cell 
                addClassName(this, 'on');

                // attach 'on' to the th in the thead with the same class name 
                var topheading = getElementsByClassName(this.oldClassName, 'th', table);
                addClassName(topheading[0], 'on');

                // attach 'on' to the far left th in the same row as this cell 
                var row = this.parentNode;
                var rowheading = row.getElementsByTagName('th')[0];
                addClassName(rowheading, 'on');
            }

            // ok, now when someone moves their mouse away, undo everything we just did. 

            tbodytds[i].onmouseout = function () {

                // remove 'on' from this cell 
                removeClassName(this, 'on');

                // remove 'on' from the th in the thead 
                var topheading = getElementsByClassName(this.oldClassName, 'th', table);
                removeClassName(topheading[0], 'on');

                // remove 'on' to the far left th in the same row as this cell 
                var row = this.parentNode;
                var rowheading = row.getElementsByTagName('th')[0];
                removeClassName(rowheading, 'on');
            }
        }
    }
    addLoadEvent(makeTheTableHeadsHighlight);
</script> 
<div class="content">

    <div class="header">

        <h1 class="page-title"><?php echo \think\Lang::get('fenpeiquanxian'); ?></h1>
    </div>

    <ul class="breadcrumb">
        <li><a href="#"><?php echo \think\Lang::get('wangzhanguanli'); ?></a> <span class="divider">/</span></li>
        <li class="active"><?php echo \think\Lang::get('fenpeiquanxian'); ?></li>
    </ul>

    <div class="container-fluid">
        <div class="row-fluid">

            <div class="btn-toolbar">
                <button class="btn btn-primary addnum"><i class="icon-plus"></i> <?php echo \think\Lang::get('tianjiayonghu'); ?></button>
                <!--                <button class="btn">Import</button>
                                <button class="btn">Export</button>-->
                <div class="btn-group">
                </div>
            </div>
            <script>
                $(".addnum").click(function () {
                    window.location.href = "<?php echo url('/adduser'); ?>";

                })
            </script>
            <div class="well">
                <table class="table"  id="rockartists" >
                    <thead>
                        <tr>
                            <th class="null" style="width: 3%"> </th>
                            <th class="one" style="width: 14%"><?php echo \think\Lang::get('yonghum'); ?></th>
                            <th class="two" style="width: 8%"><?php echo \think\Lang::get('yonghuzhuangtai'); ?></th>
                            <th class="three" style="width: 8%"><?php echo \think\Lang::get('yonghuquanxian'); ?></th>

                            <th class="seven" style="width: 8%;"><?php echo \think\Lang::get('caozuo'); ?></th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                        <tr>
                            <th><?php echo $key+1; ?></th>
                            <td class="one"><?php echo $vo['u_username']; ?></td>


                            <td class="four">
                                <label class="switch">
                                    <input type="checkbox" data-uid="<?php echo $vo['u_id']; ?>"  name="updatestatus" <?php if($vo['u_status']==1): ?>checked="checked"<?php endif; ?>>
                                           <div class="slider round"></div>
                                </label>
                                <!--                                <?php if($vo['u_status']=='1'): ?>
                                                                <font color='green'><?php echo \think\Lang::get('zhenchang'); ?></font>
                                                                <?php else: ?>
                                                                <font color='red' >冻结</font>
                                                                <?php endif; ?>-->
                            </td>
                            <td class="three">

                                <select id="DropDownTimezone" class="input-xlarge quanxian" style="width: 115px;cursor: pointer" data-uid="<?php echo $vo['u_id']; ?>" <?php if($vo['u_username']=='admin'): ?>disabled<?php endif; ?>>
                                        <?php if(is_array($rlist) || $rlist instanceof \think\Collection || $rlist instanceof \think\Paginator): $i = 0; $__LIST__ = $rlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo2): $mod = ($i % 2 );++$i;?>
                                        <option value="<?php echo $vo2['r_id']; ?>" <?php if($vo['u_rid']==$vo2['r_id']): ?>selected='selected'<?php endif; ?>><?php echo $vo2['r_name']; ?></option>
                                    <?php endforeach; endif; else: echo "" ;endif; ?>
                                </select>

                            </td>

                            <td class="seven">
                                <?php if($vo['u_username']=='admin'): else: ?>

                                <a href="#" class="del" data-qq="<?php echo $vo['u_username']; ?>" data-ids="<?php echo $vo['u_id']; ?>"><i class="icon-remove"></i></a>

                                <?php endif; ?>

                            </td>
                        </tr>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </tbody>
                    <script>
                        $("[name=updatestatus]").on('click', function () {
                            var uid = $(this).data("uid");
                            var thiss = $(this);
                            $.post("<?php echo url('Auth/ajaxupdatestatus'); ?>", {uid: uid}, function (data) {
                                //alert(data);
                                layer.load(1, {
                                    shade: [0.2, '#fff'], //0.1透明度的白色背景
                                    time: 300,
                                });
                                //alert(data.message);
                                if (typeof (data.message) != "undefined")
                                {
                                    setTimeout(function () {
                                        layer.msg(data.message, {time: 1000});
                                    }, 300);
                                    thiss.attr("checked", 'true');//全选 
                                }

                            })
                        })
                        $(".quanxian").on('change', function () {
                            var uid = $(this).data("uid");//用户本身ID
                            var rid = $(this).val();//选择权限ID
                            $.post("<?php echo url('Auth/ajaxupdate'); ?>", {uid: uid, rid: rid}, function (data) {


                                layer.load(1, {
                                    shade: [0.2, '#fff'], //0.1透明度的白色背景
                                    time: 500,
                                });
                                setTimeout(function () {
                                    layer.msg(data.message, {time: 1000});
                                }, 500);


                            })


                        })
                    </script>
                </table>
            </div>
            <div class="pagination">
                <?php echo $page; ?>
            </div>
            <script>
                $(".del").on('click', function () {
                    var qq = $(this).data("qq");
                    var ids = $(this).data("ids");
                    layer.confirm("确认删除<font color='red'>" + qq + "</font>用户吗？", {
                        btn: ['确认', '取消'] //按钮
                    }, function (index) {

                        layer.close(index);

                        layer.load(1, {
                            shade: [0.2, '#fff'], //0.1透明度的白色背景
                            time: 500
                        });
                        setTimeout(function () {
                            window.location.href = "<?php echo url('/admin/Auth/dodelete'); ?>?ids=" + ids;//注销登录
                        }, 500);


                        //            layer.msg('的确很重要', {icon: 1});
                    }, function () {

                        //            layer.msg('也可以这样', {
                        //                time: 20000, //20s后自动关闭
                        //                btn: ['明白了', '知道了']
                        //            });
                    });

                })
            </script>
            <footer>
                <hr>

                <p class="pull-right">Collect from <a href="#" title="网页模板" >sxddd</a></p>


                <p>&copy; 2019 <a href="#" >Portnine</a></p>
            </footer>

        </div>
    </div>
</div>


        <script src="/static/home/lib/bootstrap/js/bootstrap.js"></script>
        <script type="text/javascript">
            $("[rel=tooltip]").tooltip();
            $(function () {
                $('.demo-cancel-click').click(function () {
                    return false;
                });
            });
        </script>

    </body>
</html>


